//package com.codebo.homiematchbackend.controller;
//
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
//import com.codebo.homiematchbackend.common.BaseResponse;
//import com.codebo.homiematchbackend.common.ResultUtils;
//import com.codebo.homiematchbackend.model.entity.TeamUser;
//import com.codebo.homiematchbackend.service.TeamUserService;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import jakarta.annotation.Resource;
//
//@RestController
//@RequestMapping("/team/user")
//public class TeamUserController
//{
//    @Resource
//    private TeamUserService teamUserService;
//
//    @PostMapping("/add")
//    public BaseResponse<Boolean> addTeamUser(Long teamId, Long userId)
//    {
//        TeamUser teamUser = new TeamUser();
//        teamUser.setTeamId(teamId);
//        teamUser.setUserId(userId);
//        boolean save = teamUserService.save(teamUser);
//        return ResultUtils.success(save);
//    }
//
//    @PostMapping("/delete")
//    public BaseResponse<Boolean> deleteTeamUser(Long teamId, Long userId)
//    {
//        QueryWrapper<TeamUser> queryWrapper = new QueryWrapper<>();
//        queryWrapper.eq("team_id", teamId)
//                .eq("user_id", userId);
//        boolean remove = teamUserService.remove(queryWrapper);
//        return ResultUtils.success(remove);
//    }
//}
